home *** CD-ROM | disk | FTP | other *** search
- DECLARE SUB BarMenu (MenuList$(), Tr%, Fg%, Bg%, Snow%, RtnItm%)
- '*****************************************************************************
- '
- ' BarMenu.Bas
- '
- '*****************************************************************************
-
- 'Copyright (c) 1988 Marcel Madonna
-
- 'BARMENU.BAS shows the use of a simple LOTUS-like bar menu
- ' with QBWARE.
- '*****************************************************************************
-
-
- OPTION BASE 1
-
-
- ' Set up housekeeping for window drivers
-
- Snow% = 1 'Assume you will see no flicker
- 'Change this value to 0 if the screen
- 'flickers
-
-
- RESTORE BarMenu.Txt 'Menu items
-
- READ Count%
- REDIM MenuText$(Count%, 2)
- x% = 1
- READ MenuText$(1, 1)
- READ MenuText$(1, 2)
- WHILE MenuText$(x%, 1) <> "EOM" AND x% <= Count%
- x% = x% + 1
- READ MenuText$(x%, 1): READ MenuText$(x%, 2)
- WEND
- MenuText$(x%, 1) = ""
-
- Tr% = 1: Fg% = 15: Bg% = 1
- CALL BarMenu(MenuText$(), Tr%, Fg%, Bg%, Snow%, Answer%)
-
- ON Answer% GOSUB Item1, Item2, Item3, Item4, Item5, Item6, Item7, Item8, Item9, Item10
-
-
-
- CLS
- PRINT "You have exited without making a selection"
- END
-
- Item1:
- Item2:
- Item3:
- Item4:
- Item5:
- Item6:
- Item7:
- Item8:
- Item9:
- Item10:
-
- CLS
- PRINT "You have selected item" + STR$(Answer%)
- END
-
-
-
- ' These are the menu choices.
-
- BarMenu.Txt:
- DATA 15
- DATA "AItem","Item A description"
- DATA "BItem","Item B description"
- DATA "CItem","Item C description"
- DATA "DItem","Item D description"
- DATA "EItem","Item E description"
- DATA "FItem","Item F description"
- DATA "GItem","Item G description"
- DATA "HItem","Item H description"
- DATA "IItem","Item I description"
- DATA "JItem","Item J description"
- DATA "EOM","Dummy"
-
- END
-
-
-